<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>{$tpshop_config['shop_info_store_title']}</title>
	<meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
	<meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
	<link rel="stylesheet" href="__STATIC__/css/article.css" type="text/css">
	<link rel="stylesheet" href="__STATIC__/css/about.css">
</head>
<body>
<include file="Public/header" />


<if condition="$cat_parent neq '7'">
	<div class="breadcrumb-area">
		<div class="layout">
			<a href="/">{$Think.lang.homepage}</a> > {$cat_name} > {$article[$title]}
		</div>
	</div>

</if>


<if condition="$cat_parent neq '7'">
	<div class="layout" style="padding: 26px 0;">
		<div class="article_left">
			<if condition="$article_id eq 10">
				<div class="articbanner"><img src="{$article.thumb} " ></div>
				<else/>
				<div class="articbanner_other">{$article[$title]}</div>
			</if>
			<div class="article_content">{$article[$content]|htmlspecialchars_decode}
				<if condition="$article_id eq 3">
					<div id="map_contact"></div>

					<div style="clear: both;"></div>
					<script src='http://maps.google.cn/maps/api/js?key=AIzaSyCdHpY5qaap0PeaMy-VJHJoVEo0s4rcZeE&language=en' type="text/javascript"></script>
					<script>
                        var map;
                        var array = [[22.341664,113.448884]];//經緯度
                        var array1 = ["mattmatt"];
                        var title = "";
                        function initialize() {
                            var i = 0;
                            var k = 0;
                            var myLatlng = new google.maps.LatLng(22.341064,113.448884); //初始定位
                            var myOptions = {
                                zoom :14,
                                center : myLatlng, //地圖中心位置
                                mapTypeId : google.maps.MapTypeId.ROADMAP, //常量ROADMAP以地圖顯示 常量SATELLITE為衛星顯示
                                disableDoubleClickZoom : true //禁用雙擊縮放地圖
                            };
                            //把地圖綁定在ID為map_canvas的DIV上
                            map = new google.maps.Map(document.getElementById("map_contact"), myOptions);
                            //循環將數據填充到壹個新的marker對象中
                            for (i = 0; i < array.length; i++) {
                                var myLatlng = new google.maps.LatLng(array[i][k], array[i][k + 1]);//重新定位
                                //顯示信息
                                openInfo = array1[i];
                                //顯示地址的標記圖標
                                var marker = new google.maps.Marker({
                                    position : myLatlng,
                                    map : map,
                                    icon : '__STATIC__/images/fatcow_027.png' //自定義標記圖標
                                });
                                marker.setTitle(title);
                                alertTitle(marker, openInfo);
                            };
                            //infowindow.open(map);   //加載時顯示提示主窗口
                            var infowindow;
                            var infowindow2;
                            //提示信息窗口
                            function alertTitle(marker, openInfo) {
                                //鼠標懸浮在標記上打開提示信息窗口
                                google.maps.event.addListener(marker, 'mouseover', function (event) {
                                    infowindow2 = infowindow;
                                    infowindow = new google.maps.InfoWindow({
                                        content : openInfo,
                                        position : myLatlng
                                    });
                                    if (infowindow2 != null) {
                                        infowindow2.close();
                                    }
                                    infowindow.open(map, marker);
                                });
                            };
                        }
                        window.onload = initialize;
					</script>
				</if>
			</div>
		</div>
		<!--
            <script>
        $(window).scroll(function () {

            var navH = $("#article_menu").offset().top;
            var scroH = $(this).scrollTop();
            if(scroH>550){
                $("#article_menu").css({"top":25});
            }else if(scroH < 550){
                $("##article_menu").css({"position":"static"});
            }
        });
        </script>
        -->

		<div id="article_menu">
			<div class="fl mymallleft">
				<div class="li-hi-20" >

					<div class="fuy-xim pa-bo-20">
						<ul>
							<li>
								<h3><span>{$cat_name}</span></h3>
								<ol>
									<tpshop sql="select * from `__PREFIX__article` where cat_id = $article[cat_id] and is_open=1 order by sort asc,article_id desc" key="k2" item='v2'>
										<?php if($v2[link]!="javascript:void(0)") { ?>
										<li id="order_list"><a href="{:U('Home/Article/detail',array('article_id'=>$v2[article_id]))}"><span <if condition="$v2[article_id] eq $article_id">style="color:#000;"</if>><i class="icon-radio-checked"></i>{$v2[$title]}</span></a></li>
										<?php } ?>
									</tpshop>
								</ol>
							</li>

						</ul>
					</div>
				</div>
			</div>

		</div>
	</div>
	<else/>

	<div class="layout" style="padding: 0 0;">

		<div class="about-wrapper" data-img-height="0">

			<div class="about-banner f0"><img class="w100p" src="__STATIC__/images/about/banner.jpg" alt=""></div>


            <tpshop sql="select * from `__PREFIX__article_cat` where parent_id = $cat_parent and show_in_nav=1  order by sort_order asc" key="k3" item='v3'>
			<div class="a-list open" id="{$v3[keywords]}">
				<h2><span class="icon"></span>{$v3[$catnamefooter]}</h2>
                
                  <tpshop sql="select * from `__PREFIX__article` where cat_id = $v3[cat_id] and is_open=1  order by sort asc,article_id desc" key="k4" item='v4'>
                    <div class="a-content">
                        <div class="a-des w50p">
                        <if condition="$v4[article_id] eq '24'">
                       	 {$v4[$content]|htmlspecialchars_decode}
                        <else/>
                       
                            <h6>{$v4[$title]}</h6>
                            <p>{$v4[$content]|htmlspecialchars_decode}</p> </if>
                        </div>
                        <div class="a-image f0 w50p"><img class="w100p" src="{$v4[thumb]}" alt=""></div>
                        <br class="clear">
                    </div>
           		 </tpshop>
				
			</div>
            </tpshop>
            
		</div>
		<script>
            $(function(){
                // 锚点定位
                /*var hash = window.location.hash + ''
                if(hash) {
                    setTimeout(function(){
                        var $target = $(hash)
                        var TARGET_TOP = $target.offset().top
                        $('html,body').animate({scrollTop: TARGET_TOP}, 200)
                        $target.children('h2').click()
                    },800)
                }*/

                var $wrapper = $('.about-wrapper'),
                    HEADER_HEIGHT = 120
                $('.a-list > h2').click(function(){
                    var IMG_HEIGHT = parseInt($wrapper.attr('data-img-height')),
                        $parent = $(this).parent('.a-list'),
                        LENGTH = $parent.find('.a-content').length
                    if(!LENGTH) return
                    if(!IMG_HEIGHT){
                        return FirstImgHeight(i)
                    }
                    var MAX_HEIGHT = ( IMG_HEIGHT * LENGTH ) + HEADER_HEIGHT
                    !$parent.hasClass('open') ? $parent.addClass('open').css('height', MAX_HEIGHT) : $parent.removeClass('open').css('height', HEADER_HEIGHT)
                })
                FirstImgHeight()
                function FirstImgHeight(resize) {
                    if(resize) {
                        var FIRST_IMG_HEIGHT = $('.a-image').eq(0).height()
                        ResetHeight(FIRST_IMG_HEIGHT)
                        ResetListHeight(FIRST_IMG_HEIGHT)
                    } else {
                        var FirstImg = $wrapper.find('img').eq(1)
                        var	src = FirstImg.attr('src')
                        var	Img = new Image()
                        Img.src = src
                        Img.onload = function() {
                            var FIRST_IMG_HEIGHT = FirstImg.parents('.a-image').height()
                            ResetHeight(FIRST_IMG_HEIGHT)
                        }
                    }
                }
                function ResetHeight(h) {
                    $('.a-content').css('height', h)
                    $wrapper.attr('data-img-height', h)
                }
                function ResetListHeight(h) {
                    var $list = $('.a-list')
                    $list.each(function(i, el){
                        if($(el).hasClass('open')) {
                            var ACONTENT_LENGTH = $list.eq(i).find('.a-content').length,
                                ACONTENT_MAX_LENGTH = ( h * ACONTENT_LENGTH ) + HEADER_HEIGHT
                            $list.eq(i).css('height', ACONTENT_MAX_LENGTH)
                        }
                    })
                }
                $(window).resize(function(){
                    FirstImgHeight(true)
                })
            })
		</script>
	</div>

</if>
			<if condition="$keywords neq ''">
					<script>
						$('window,body').animate({scrollTop:$("#{$keywords}").offset().top},1000);
					</script>
					</if>

<!--------footer-開始-------------->
<include file="Public/footer" />
<!--------footer-結束-------------->

</div>
</body>
</html>